const SkeletonWebpackPlugin = require('vue-skeleton-webpack-plugin');
const path = require('path')
module.exports = {
    publicPath:'./' ,
    devServer: {
        proxy: {
            '/api':{
                target: 'http://i.yd-jxt.com',
                // target: 'http://192.168.3.20:8154/',
                changeOrigin: true,
                pathRewrite: {
                '^/api': '/v2'
                }
            },
        },
        disableHostCheck: true
    },
    chainWebpack: config => {
        // 其他配置
        config.entry('main').add('babel-polyfill') // main是入口js文件
        // 其他配置
    },
    lintOnSave: false,
     configureWebpack: (config) => {
         // vue骨架屏插件配置
         config.plugins.push(new SkeletonWebpackPlugin({
            webpackConfig: {
                 entry: {
                     app: path.join(__dirname, './entry-skeleton.js'),
                 },
             },
            minimize: true,
            quiet: true,
            router: {
                  mode: 'hash',
                  routes: [{
                          path: '/about',
                          skeletonId: 'skeleton1'
                      },
                      {
                          path: '/',
                          skeletonId: 'skeleton2'
                      },
                  ]
              }
         }))
     },
    
};
